8c2dcf8ea851f2f016ce439f19ae00b2fec18de3,Core/src/org/sleuthkit/autopsy/directorytree/ExplorerNodeActionVisitor.java,ShowDetailActionVisitor,visit,#Image#,78

Before Change


    public List<? extends Action> visit(final Image img) {
        final String title = "Image Details";

        return Collections.singletonList(new AbstractAction(title) {

            @Override
            public void actionPerformed(ActionEvent e) {
                Logger.noteAction(ShowDetailActionVisitor.class);

                final JFrame frame = new JFrame(title);
                final JDialog popUpWindow = new JDialog(frame, title, true); // to make the popUp Window to be modal
                // if we select the Image Details menu

                Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();

                // set the popUp window / JFrame
                popUpWindow.setSize(750, 400);

                int w = popUpWindow.getSize().width;
                int h = popUpWindow.getSize().height;

                // set the location of the popUp Window on the center of the screen
                popUpWindow.setLocation((screenDimension.width - w) / 2, (screenDimension.height - h) / 2);

                ImageDetailsPanel imgDetailPanel = new ImageDetailsPanel();
                Boolean counter = false;

                imgDetailPanel.setImgNameValue(img.getName());
                imgDetailPanel.setImgTypeValue(Image.imageTypeToString(img.getType()));
                imgDetailPanel.setImgSectorSizeValue(Long.toString(img.getSsize()));
                counter = true;

                if (counter) {
                    // add the volume detail panel to the popUp window
                    popUpWindow.add(imgDetailPanel);
                } else {
                    // error handler if no volume matches
                    JLabel error = new JLabel("Error: No Volume Matches.");
                    error.setFont(new Font("Arial", Font.BOLD, 24));
                    popUpWindow.add(error);
                }

                // add the command to close the window to the button on the Volume Detail Panel
                imgDetailPanel.setOKButtonActionListener(new ActionListener() {

                    @Override
                    public void actionPerformed(ActionEvent e) {
                        popUpWindow.dispose();
                    }
                });


                popUpWindow.pack();
                popUpWindow.setResizable(false);
                popUpWindow.setVisible(true);
            }
        });
    }

    @Override

After Change


    public List<? extends Action> visit(final Image img) {
        final String title = "Image Details";
        
        List<Action> lst = new ArrayList<Action>();
        lst.add(new ExtractUnallocAction("Extract Unallocated Space to Single Files", img));
        lst.add(new AbstractAction(title) {

            @Override
            public void actionPerformed(ActionEvent e) {
                Logger.noteAction(ExplorerNodeActionVisitor.class);

                final JFrame frame = new JFrame(title);
                final JDialog popUpWindow = new JDialog(frame, title, true); // to make the popUp Window to be modal
                // if we select the Image Details menu

                Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();

                // set the popUp window / JFrame
                popUpWindow.setSize(750, 400);

                int w = popUpWindow.getSize().width;
                int h = popUpWindow.getSize().height;

                // set the location of the popUp Window on the center of the screen
                popUpWindow.setLocation((screenDimension.width - w) / 2, (screenDimension.height - h) / 2);

                ImageDetailsPanel imgDetailPanel = new ImageDetailsPanel();
                Boolean counter = false;

                imgDetailPanel.setImgNameValue(img.getName());
                imgDetailPanel.setImgTypeValue(Image.imageTypeToString(img.getType()));
                imgDetailPanel.setImgSectorSizeValue(Long.toString(img.getSsize()));
                counter = true;

                if (counter) {
                    // add the volume detail panel to the popUp window
                    popUpWindow.add(imgDetailPanel);
                } else {
                    // error handler if no volume matches
                    JLabel error = new JLabel("Error: No Volume Matches.");
                    error.setFont(new Font("Arial", Font.BOLD, 24));
                    popUpWindow.add(error);
                }

                // add the command to close the window to the button on the Volume Detail Panel
                imgDetailPanel.setOKButtonActionListener(new ActionListener() {

                    @Override
                    public void actionPerformed(ActionEvent e) {
                        popUpWindow.dispose();
                    }
                });


                popUpWindow.pack();
                popUpWindow.setResizable(false);
                popUpWindow.setVisible(true);
            }
        });
        
        return lst;
    }

    @Override